Anillo 3 - OriginalAn interactive fiction by Mel Hython (2009) - the Inform 7 source text | |
Home page Contents Previous Next Complete text | Chapter 2 - Cambios
Musica-Intro-Sonando is a truth state that varies. Musica-Intro-Sonando is false. To start musical introduction: now Musica-Sonando is true; now Musica-Intro-Sonando is true; [aviso: la intro ahora esta sonando!] [asumimos que has asignado el canal con anterioridad] dplay the sound of inicio, notifying when finished. [Esta regla captura el Soundnotify, avisa que la intro termino (para que la regla Restore-Intro-Music ya no haga nada) y finalmente reproduce la musica del juego] A glulx sound notification rule (this is the Start-Game-Music rule): now Musica-Intro-Sonando is false; [aviso: la intro ya no esta sonando!] now Musica-Sonando is false; [asumimos que has asignado el canal con anterioridad] reponer banda sonora. A glulx object-updating rule (this is the Restore-Intro-Music rule): if Musica-Intro-Sonando is true: start musical introduction. To temporizar cada (MS - number) ms: (- if (glk_gestalt(gestalt_Timer,0)) { glk_request_timer_events({MS}); } -) To activar sonidos ambientales: temporizar cada 2000 ms. [es decir, cada 2 segundo] To desactivar sonidos ambientales: temporizar cada 0 ms. [es decir, desactiva el timer] A glulx object-updating rule (this is the Restore-Sonidos-Ambientales rule): if Primera-Ejecucion is true: [esto solo se ejecuta 1 vez, antes de iniciar nada del juego] now Primera-Ejecucion is false; [corrige la pifia de Windows Glulxe que te explique arriba!!] stop; [importante: no se debe seguir ejecutando el resto de la regla!!] if Efectos-Sonando is true: activar sonidos ambientales; otherwise: desactivar sonidos ambientales. The Restore-Sonidos-Ambientales rule is listed after update sound-objects of Damusix rule in the glulx object-updating rules. The Restore-Intro-Music rule is listed after update sound-objects of Damusix rule in the glulx object-updating rules. [ Poner lo adecuado cuando termine el inicial ] To reponer banda sonora: now Musica-Sonando is true; if location is in Pantano: dplay sound of pantano; otherwise if location is in Castillo: dplay sound of castillo; otherwise: dplay sound of cuevas. Musica-Sonando is a truth state that varies. Musica-Sonando is false. Efectos-Sonando is a truth state that varies. Efectos-Sonando is false. To subir musica: if Musica-Intro-Sonando is true: simple fade in sound of inicio to global volume over 250 ms; otherwise if sound of pantano is playing in the background: simple fade in sound of pantano to global volume over 250 ms; otherwise if sound of cuevas is playing in the background: simple fade in sound of cuevas to global volume over 250 ms. To bajar musica: if Musica-Intro-Sonando is true: simple fade out sound of inicio to 40% volume over 250 ms; otherwise if sound of pantano is playing in the background: simple fade out sound of pantano to 40% volume over 250 ms; otherwise if sound of cuevas is playing in the background: simple fade out sound of cuevas to 40% volume over 250 ms. To cambiar estado efectos: if Efectos-Sonando is true: say "Silenciando efectos sonoros."; now Efectos-Sonando is false; if location is in Pantano: dstop sound of efectos; desactivar sonidos ambientales; subir musica; otherwise: say "Activando efectos sonoros."; now Efectos-Sonando is true; if location is in Pantano and location is not Pantano23 and location is not Pantano24: dplay sound of efectos; bajar musica; activar sonidos ambientales. To cambiar estado musica: if Musica-Sonando is true: say "Silenciando música."; now Musica-Sonando is false; if Musica-Intro-Sonando is true: now Musica-Intro-Sonando is false; dstop sound of inicio; otherwise if location is in Castillo: dstop sound of castillo; otherwise if location is in Pantano: dstop sound of pantano; otherwise: dstop sound of cuevas; otherwise: say "Activando música."; now Musica-Sonando is true; reponer banda sonora. Primera-Ejecucion is a truth state that varies. Primera-Ejecucion is true. A glulx timed activity (this is the Gran Ambientador de Sonidos rule): if the location of lobo is adjacent to location and a random chance of 10 in 100 succeeds: vplay the Sound of aullido; if lobo is visible and a random chance of 15 in 100 succeeds: vplay the Sound of grulobo; if the location of deavork is adjacent to location and a random chance of 15 in 100 succeeds: vplay the Sound of grunido; if the deavork is visible and a random chance of 10 in 100 succeeds: vplay the sound of aleteo; if the location is in Cuevas: if a random chance of 10 in 100 succeeds: vplay sound of gota. [============================== El relato ==============================] |